﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="PMS.Web.Test" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <link href="css/jquery.autocomplete.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/StockJS.js" type="text/javascript"></script>
    <script src="Scripts/jquery.autocomplete.pack.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            if (typeof (EALists) != 'undefined') {
                $("#txt_code").autocomplete(EALists, {
                    max: 9,
                    minChars: 1,
                    width: 180,
                    matchContains: true,
                    autoFill: false,
                    formatItem: function (row, i, max) {
                        return row.C + " " + row.N;
                    },
                    formatMatch: function (row, i, max) {
                        return row.C + " " + row.S + " " + row.N;
                    },
                    formatResult: function (row) {
                        return row.C;
                    }
                });
            }

            if ($("#txt_code").val() == "") {
                $("#txt_code").val("输入股票代码/名称/简拼");
            }

            $("#txt_code").focus(function () {
                if ($("#txt_code").val() == "输入股票代码/名称/简拼")
                    $("#txt_code").val("");
            });
            $("#txt_code").blur(function () {
                if ($("#txt_code").val() == "")
                    $("#txt_code").val("输入股票代码/名称/简拼");
            });
        });

    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <input type="text" id="txt_code" value="输入股票代码/名称/简拼" />
    </div>
    </form>
</body>
</html>
